<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

    
    <button>send</button>

    <script src="../../js/jquery-3.2.1.js"></script>
    <script>
        var domain = 'http://127.0.0.1:8080';
        var myPopup = window.open(domain + '/跨文档操作/window/obtain.html', 'myWindow');

        $('button').on('click', function () {
            var message = 'Hello';
            myPopup.postMessage(message, domain);
        })
    </script>
</body>

</html>